package com.fastec.controller.mobile;


import com.fastec.common.ServerResponse;
import com.fastec.pojo.User;
import com.fastec.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by CaiPengFei on 2018/1/23.
 */
@Controller
@RequestMapping("/mobile/user/")
public class UserMobileController {

    @Autowired
    IUserService iUserService;

    @RequestMapping(value = "login.do",method = RequestMethod.POST)
    @ResponseBody
    public ServerResponse<User> login(String email,String password){
        ServerResponse<User> response =iUserService.loginApp(email,password);
        return response;
    }
}
